package com.example.shopsystem.aop;


import org.springframework.web.context.request.RequestContextHolder;

import static org.springframework.web.context.request.RequestAttributes.SCOPE_REQUEST;

public class GetIdUtil {
    public static String getCurrentUser(){
        return (String) RequestContextHolder.currentRequestAttributes().getAttribute("id",SCOPE_REQUEST);
    }
}
